//
//  TBRReceptPlaneAppointCell.m
//  TBRentClient
//
//  Created by tonbright on 2018/5/14.
//  Copyright © 2018年 tonbright. All rights reserved.
//

#import "TBRReceptPlaneAppointCell.h"
#import "TBRGetPlaneMessageModel.h"
@interface TBRReceptPlaneAppointCell()
@property (weak, nonatomic) IBOutlet UIView *view_green;
@property (weak, nonatomic) IBOutlet UIView *view_red;
@end
@implementation TBRReceptPlaneAppointCell

- (void)awakeFromNib {
    [super awakeFromNib];
    _view_red.layer.cornerRadius = 6.5;
    _view_green.layer.cornerRadius = 6.5;
}

- (IBAction)btnClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(ReceptPlaneAppointCellBtnClick:)]) {
        [self.delegate ReceptPlaneAppointCellBtnClick:sender.tag];
    }
}

- (void)refreshUI {
    TBRGetPlaneMessageModel *planeMessageModel = [TBRRentAllMessageModel shareAllMessageModel].selPlaneMessageModel;
    if ([HelpObject isBlankString:planeMessageModel.showPlaneStr]) {
        _view_plane.hidden = YES;
    }else {
        _view_plane.hidden = NO;
        _lbe_planeNum.text = planeMessageModel.flightNo;
        _lbe_planeDetail.text = planeMessageModel.showPlaneStr;
    }
    
    _lbe_offCarPlace.text = [HelpObject isBlankString:[TBRRentAllMessageModel shareAllMessageModel].offPlace] ? @"您在哪下车" : [TBRRentAllMessageModel shareAllMessageModel].offPlace;
}

@end
